<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sijyp="http://java.sun.com/jsf/composite/sijyp">


	<a4j:region id="rg_victima_registros">
	<br />
	<h:outputLabel id="registros_existentes_lbl"
									value="Victimas registradas" />
	<hr width="100%" />
		<rich:dataTable id="dt_victima_table" keepSaved="true" var="record"
			style="width: 100%"
			value="#{registroCadaveres.cadaverExhumarDm.dataModel}" rows="10"
			rendered="#{registroCadaveres.cadaverExhumarDm != null}"
			noDataLabel="${msg['general.registrosNoEncontrados']}">

			<ui:include src="/resources/sijyp/dataModels/column.xhtml">
				<ui:param name="render_sort" value="dt_victima_table" />
				<ui:param name="key" value="nombre" />
				<ui:param name="header"
					value="#{msgExh['exhumaciones.nombre_completo']}" />
				<ui:param name="column" value="1" />
				<ui:param name="managedBean"
					value="#{registroCadaveres.cadaverExhumarDm}" />
			</ui:include>

			<ui:include src="/resources/sijyp/dataModels/column.xhtml">
				<ui:param name="render_sort" value="dt_victima_table" />
				<ui:param name="key" value="numeroDocumento" />
				<ui:param name="header"
					value="#{msgExh['exhumaciones.diligencia.num_documento']}" />
				<ui:param name="column" value="2" />
				<ui:param name="managedBean"
					value="#{registroCadaveres.cadaverExhumarDm}" />
			</ui:include>

			<ui:include src="/resources/sijyp/dataModels/column.xhtml">
				<ui:param name="render_sort" value="dt_victima_table" />
				<ui:param name="key" value="rangoEdad" />
				<ui:param name="header"
					value="#{msgExh['exhumaciones.catalogo.posible_rango_edad']}" />
				<ui:param name="column" value="3" />
				<ui:param name="managedBean"
					value="#{registroCadaveres.cadaverExhumarDm}" />
			</ui:include>

			<ui:include src="/resources/sijyp/dataModels/column.xhtml">
				<ui:param name="render_sort" value="dt_victima_table" />
				<ui:param name="key" value="sirdecDesaparecido" />
				<ui:param name="header"
					value="#{msgExh['exhumaciones.cadaver_exhumar.reporte_sirdec_desaparecido']}" />
				<ui:param name="column" value="4" />
				<ui:param name="managedBean"
					value="#{registroCadaveres.cadaverExhumarDm}" />
			</ui:include>

			<ui:include src="/resources/sijyp/dataModels/column.xhtml">
				<ui:param name="render_sort" value="dt_victima_table" />
				<ui:param name="key" value="sirdecCadaver" />
				<ui:param name="header"
					value="#{msgExh['exhumaciones.cadaver_exhumar.reporte_sirdec_victima']}" />
				<ui:param name="column" value="5" />
				<ui:param name="managedBean"
					value="#{registroCadaveres.cadaverExhumarDm}" />
			</ui:include>



			<rich:column>
				<f:facet name="header">
					<h:outputLabel
						value="${msg['bienes.origen.deOficio.tabla.acciones']}" />
				</f:facet>
				<h:panelGrid columns="3"
					columnClasses="icon_space,icon_space,icon_space,icon_space,icon_space">

					<h:commandLink id="editCL_cadaver" value=""
						action="#{registroCadaveres.editarRegistroCadaver(record[0])}"
						rendered="#{registroCadaveres.estado == 'INSERTAR' or registroCadaveres.estado == 'EDITAR'}">
						<f:ajax render="frm_caso:grupo_diligencia_cadaver" />
						<h:graphicImage value="/resources/images/icons/ico_pencil.png"
							title="${msg['boton.editar']}" />
						<h:graphicImage
							value="/resources/images/icons/ico_pencil_gray.png"
							title="${msg['boton.editar']}"
							rendered="#{registroCadaveres.estado == 'VER'}" />
					</h:commandLink>


					<h:commandLink id="viewCL_cadaver" value=""
						action="#{registroCadaveres.verRegistroCadaver(record[0])}"
						rendered="true">
						<f:ajax render="frm_caso:grupo_diligencia_cadaver" />
						<h:graphicImage value="/resources/images/icons/ico_details.png"
							title="${msg['boton.consultar']}" />
						<h:graphicImage rendered="false"
							value="/resources/images/icons/ico_details_disabled.png"
							title="${msg['boton.consultar']}" />
					</h:commandLink>

						
					<h:commandLink id="deleteCL_cadaver" value=""
						action="#{registroCadaveres.setIdRegistroCadaver(record[0])}"
						disabled="#{registroCadaveres.disableEliminarRegistroCadaver}"
						onclick="#{rich:component('confirmarEliminarRegistroCadaver')}.show()">
						<h:graphicImage value="/resources/images/icons/ico_delete.png"
							rendered="#{!registroCadaveres.disableEliminarRegistroCadaver}"
							title="#{msg['boton.eliminar']}" />
						<h:graphicImage
							value="/resources/images/icons/ico_delete_disabled.png"
							title="#{msg['boton.eliminar']}"
							rendered="#{registroCadaveres.disableEliminarRegistroCadaver}" />
						<f:ajax execute="deleteCL" render="rg_victima_registros" />
					</h:commandLink>

				</h:panelGrid>
			</rich:column>
			<f:facet name="footer">
				<rich:dataScroller id="scroller"   maxPages="10"
								fastStep="5"
								fastControls="hide" stepControls="show">
							</rich:dataScroller>
			</f:facet>
		</rich:dataTable>
		<sijyp:confirmDialog message="#{msg['general.confirmaBorrar']}"
			confirmId="confirmarEliminarRegistroCadaver"
			renderComponents="pnl_victima_registros"
			acceptAction="#{diligenciaRegistrarCaso.registroCadaveres.eliminarRegistroCadaver}" />
	</a4j:region>

</ui:composition>
